package com.aspose.cells.a.d;

public class zej {
   private zdh b;
   private zek c;
   private zek d;

   public zej(zdh var1) throws Exception {
      this.b = var1;
      this.c = new zek(this.b, "Root", -1, (zdj)null, true);
      this.d = this.c;
   }

   public void a(String var1, int var2, zdj var3, boolean var4) throws Exception {
      assert var1 != null;

      assert var2 >= 0;

      assert var3 != null;

      zek var5 = new zek(this.b, var1, var2, var3, var4);
      if (var5.b > this.d.b) {
         this.d.a(var5);
      } else if (var5.b >= this.d.b) {
         this.d.d.a(var5);
      } else {
         while(this.d.b >= var5.b) {
            this.d = this.d.d;
         }

         this.d.a(var5);
      }

      this.d = var5;
   }

   public void a(zeg var1) throws Exception {
      var1.a(this.c);
      var1.g();
      var1.a("/Type", "/Outlines");
      if (this.c.i != null) {
         var1.a("/First", this.c.i.n());
      }

      if (this.c.j != null) {
         var1.a("/Last", this.c.j.n());
      }

      var1.h();
      var1.b();

      for(zek var2 = this.c.i; var2 != null; var2 = var2.h) {
         var2.a(var1);
      }

   }

   public boolean a() {
      return this.c.i == null;
   }

   public String b() {
      return this.c.n();
   }
}
